package com.hzcx.app.simplechat.ui.friend.adapter;

import android.view.View;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.hzcx.app.simplechat.R;
import com.hzcx.app.simplechat.ui.friend.bean.FriendCityBean;
import com.hzcx.app.simplechat.util.empty.EmptyUtils;
import com.hzcx.app.simplechat.util.glide.GlideUtils;

import java.util.List;

public class FriendLableInfoContentAdapter extends BaseQuickAdapter<FriendCityBean, BaseViewHolder> {
    public FriendLableInfoContentAdapter(@Nullable List<FriendCityBean> data) {
        super(R.layout.rv_item_friend_lable_info_content, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, FriendCityBean item) {
        GlideUtils.loadImg(mContext, item.getAvatar(), helper.getView(R.id.iv_head));
        helper.setText(R.id.tv_nick_name, EmptyUtils.isNotEmpty(item.getRemarks_name()) ? item.getRemarks_name() : item.getNickname());

        helper.addOnClickListener(R.id.tv_delete);
    }
}
